﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace CityLife
{
	public partial class ElementToolBar : UserControl
	{

        public ICityElement CityElement = null;

		public ElementToolBar()
		{
			// Required to initialize variables
			InitializeComponent();

            LayoutRoot.IsHitTestVisible = true;
		}

        public void SetVisible()
        {
            this.Visibility = Visibility.Visible;
        }


        public void Show()
        {
      
            this.Visibility = Visibility.Visible;
            Open.Begin();

        }

        public void Hide()
        {
            Close.Begin();
            this.Visibility = Visibility.Collapsed;
        }

        private void LayoutRoot_MouseLeave(object sender, MouseEventArgs e)
        {
            this.Visibility = Visibility.Collapsed;
            //
        }

        private void ellipse_MouseEnter(object sender, MouseEventArgs e)
        {
            this.Visibility = Visibility.Visible;

        }

        private void Canvas_MouseEnter(object sender, MouseEventArgs e)
        {
            this.Visibility = Visibility.Visible;
        }

	}
}